﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace EyFramework.AutoUpdate
{
    public partial class FrmUpdateUrl : Form
    {
        public string UpdateUrl = "";

        public FrmUpdateUrl()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
        }

        private void btnSure_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.OK;
            UpdateUrl = tbInput.Text.Trim();
            this.Close();
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void tbInput_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyValue == 13)
            {
                if (!string.IsNullOrEmpty(tbInput.Text.Trim()))
                {
                    btnSure_Click(sender, null);
                }
            }
        }

        private void FrmUpdateUrl_Load(object sender, EventArgs e)
        {
            tbInput.Focus();
        }
    }
}